package com.xinqi.modules.prepare.question.service;

import com.xinqi.common.base.dto.QuestionBaseDTO;
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;

/**
 * 导入
 *
 * @author: wenjie
 * @date: 2023/3/26 10:47
 */
public interface PrepareQuestionImportService {

    /**
     * 导入word试题文件，只支持 docx格式的文件导入
     *
     * @param file
     * @return
     * @throws IOException
     * @throws URISyntaxException
     */
    List<QuestionBaseDTO> docxToWordImportQuestions(MultipartFile file) throws Exception;

    /**
     * 获取question对象集
     *
     * @param source
     * @return
     */
    List<QuestionBaseDTO> getQuestionList(List<XWPFParagraph> source) throws URISyntaxException;
}
